package com.mashibing.service.impl;

import com.mashibing.internalcommon.dto.ResponseResult;
import com.mashibing.internalcommon.response.TerminalResponse;
import com.mashibing.internalcommon.response.TrsearchResponse;
import com.mashibing.remote.TerminalMapClient;
import com.mashibing.service.TerminalMapService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TerminalMapServiceImpl implements TerminalMapService {

    @Autowired
    private TerminalMapClient terminalMapClient;

    @Override
    public ResponseResult<TerminalResponse> addTerminal(String name, String desc) {
        return terminalMapClient.addTerminal(name, desc);
    }

    @Override
    public ResponseResult<List<TerminalResponse>> aroundsearch(String center, Integer radius) {
        return terminalMapClient.aroundsearch(center,radius);
    }

    @Override
    public ResponseResult<TrsearchResponse> trackSearch(String tid, Long starttime, Long endtime) {
        return terminalMapClient.trackSearch(tid,starttime,endtime);
    }
}
